package com.javathree;


public class Demo4 {
    //打印：初始化菜单-->打印
    public static void main(String[] args) {
        //菜单的容器
        Menu[] menus = new Menu[4];
        Menu menu = new Menu();
        menu.id=1;
        menu.mName="红烧肉";
        menu.mPrice=28.5;

        Menu menu1 = new Menu();
        menu1.id=2;
        menu1.mName="炒青菜";
        menu1.mPrice=8;

        Menu menu2 = new Menu();
        menu2.id=3;
        menu2.mName="西红柿炒鸡蛋";
        menu2.mPrice=9;

        Menu menu3 = new Menu();
        menu3.id=4;
        menu3.mName="佛跳墙";
        menu3.mPrice=999;

        menus[0]=menu;
        menus[1]=menu1;
        menus[2]=menu2;
        menus[3]=menu3;

        System.out.println("编号\t\t\t\t名称\t\t\t价格\t\t\t数量");
        for (int i=0;i<menus.length;i++){
            System.out.println(menus[i].id+"\t\t\t\t"+menus[i].mName+"\t\t\t"+menus[i].mPrice+"\t\t\t"+menus[i].count);
        }
    }
}
